home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-19 / gpt32src.zip / MAKEFILE.UNX < prev    next >
Text File  |  1992-05-05  |  26KB  |  713 lines

  1. #
  2. # $Id: makefile.unx,v 3.26 92/03/24 22:36:48 woo Exp Locker: woo $
  3. #
  4. ############################################################
  5. #
  6. # GNUPLOT 3.2 Makefile (Unix X11 support) for
  7. #  Apollo/Sun/Dec5000/IBMrs6000/HP9000/SGI/3B1/386IX/Cray
  8. #
  9. # Original version by:
  10. #   oliveria@caen.engin.umich.edu (ROQUE DONIZETE DE OLIVEIRA)
  11. #   Wed, 3 Jul 91 14:31:37 -0400
  12. #
  13. #>>> Customizing: You must customize part of this makefile for your site.
  14. #>>> Then type 'make' for further instructions.
  15. #>>> Customization instructions look like these lines do (#>>>).
  16. #
  17.  
  18. TARGET = All # What to make by default
  19.  
  20. ############################################################
  21. #>>> Decide where the binaries and manuals will go. 
  22. # directory where to install executables on 'make install'
  23. DEST=/usr/local/bin
  24. # directory for installing man page on 'make man_install'.
  25. MANDEST=/usr/local/man/manl
  26. # where to install help file gnuplot.gih
  27. HELPDEST=/usr/local/lib/gnuplot.gih
  28. #HELPDEST=docs/gnuplot.gih
  29. # Where to send email about bugs and comments (locally)
  30. EMAIL=bug-gnuplot@ames.arc.nasa.gov
  31.  
  32. ############################################################
  33. #>>> Choose your C compiler and basic compiler flags.
  34. CC     = cc # the C compiler
  35. COPTS  = -O # -O if you trust your compiler's optimizer
  36. LD     =$(CC) $(CFLAGS)        # default loading command
  37. NPROC  = 2
  38. RCSOLD = 3.25
  39. RCSVER = 3.26
  40. RCSCOM = "gnuplot3.2  release6"
  41.  
  42. ############################################################
  43. #>>> Choose some optional features. 
  44. #>>> At this point there are only two optional features:
  45. # READLINE:
  46. #   If READLINE is defined, then command-line editing is supported.
  47. #   Otherwise, your normal terminal editing is all you get.
  48. #   Some machines will not support this, and they will turn this
  49. #   option off (for example, apollos running SR10.2 or SR10.3 and
  50. #   loaded with BSD4.3 instead of SYS5). Note: problems with 
  51. #   gnuplot prompts have been noted when this feature is selected
  52. #   on IBM RS/6000 AIX, and compile errors are encountered on
  53. #   Sequent Dynix 3 and Convex OS 9.0.
  54. # NOCWDRC:
  55. #   If NOCWDRC is defined, then any .gnuplot in the current directory
  56. #   is not read on startup. This is a security consideration
  57. #   especially for root users ( we recommend you define -DNOCWDRC ).
  58. OPTIONS = -DREADLINE -DNOCWDRC
  59.  
  60. #>>> Optionally install the lasergnu script.
  61. # Lasergnu is a handy shell script for creating a plot from the
  62. # command line and sending it directly to the printer. It currently
  63. # supports postscript and imagen printers, and probably would need
  64. # tailoring to your site.
  65. # Use lasergnu_install to install lasergnu.
  66. # Use lasergnu_noinstall to not install lasergnu (default).
  67. LASERGNU = lasergnu_install
  68.  
  69. ############################################################
  70. # X11 support
  71. #
  72.  
  73. #>>> List your X11 libraries
  74. X11LIBS = -lX11
  75.  
  76. #>>> List where the X11 include directory is found (if other than /usr/include)
  77. X11INCLUDES =
  78.  
  79. #>>> List additional CFLAGS for X11 compilation
  80. # -DOLD_SELECT if you have an old 4.2 BSD OS (e.g. Sun OS 3.5) and
  81. #   encounter compile error for missing include file <sys/select.h>
  82. X11FLAGS = 
  83.  
  84. #>>> You shouldn't have to change these, since they are controlled by
  85. #>>> Machine dependent definitions below.
  86. #       Compile option for plot.c and TERMFLAGS, to include X11 support
  87. PLOTXFLAG = -DX11
  88. #       make gnuplot_x11 by default
  89. GNUPLOT_X11 = gnuplot_x11
  90. #       install gnuplot_x11 by default
  91. X11INSTALL = x11_install
  92.  
  93. ############################################################
  94. #>>> Okay, you've changed enough. Now type 'make'.
  95.  
  96. ############################################################
  97. # This is used to pass many of the above definitions to make
  98. # subprocesses. Don't change this.
  99. MY_FLAGS  = CC="$(CC)"     COPTS="$(COPTS)" DEST="$(DEST)" \
  100.         MANDEST="$(MANDEST)" HELPDEST="$(HELPDEST)" \
  101.         EMAIL="$(EMAIL)" LASERGNU="$(LASERGNU)"
  102.  
  103. ############################################################
  104. # Explanations of CFLAGS definitions.
  105. #  These should not need to be changed by you.
  106. # They are set correctly for each machine below. If your machine
  107. # doesn't fit the one of the patterns, override on the make command
  108. # line or make a new target for it and a new _FLAGS definition. 
  109. #  -DNOVFORK if you're unix and you have don't have vfork()
  110. #  -DMEMSET if you need to use memset() instead of bzero() 
  111. #  -DMEMCPY if your bcopy() is called memcpy()
  112. #  -DNOCOPY if you don't have a memcpy() by any name
  113. #  -DGAMMA=foo if your gamma function is called foo(). Apollos have
  114. #    lgamma(3m). If you don't have gamma(), use -DNOGAMMA.
  115. #    The default is -DGAMMA=gamma.
  116. #  -DGETCWD if your unix uses getcwd() instead of getcd()
  117. #    this is needed by HP-UX and Cray Unicos systems.
  118. #  -DULTRIX_KLUDGE if you run X windows on Ultrix and experience the
  119. #    "every other plot" problem.
  120. #  -DCRIPPLED_SELECT if "select errors" are encountered with X. This
  121. #    option is needed on SVR3 platforms with incomplete support for
  122. #    the BSD select() system call
  123. #  -Dunix is required to explicitly define "unix" for SCO and IBM
  124. #          RS/6000 running AIX 3.1 
  125. #  -fswitch if you are compiling on a Sun3 (or even -f68881)
  126. #    (but -fswitch is buggy on some systems, so watch out)
  127.  
  128. # Defaults in case the user types 'make All' directly
  129. # Should match X11_FLAGS's CFLAGS definition
  130. CFLAGS = $(COPTS) $(OPTIONS)
  131.  
  132. ############################################################
  133. # Terminal (device) support
  134. #
  135. # All devices available to a given machine are compiled in by default.
  136. # This documents the flags available in TERMFLAGS, although TERMFLAGS
  137. # is usually controlled by the machine-dependent definitions below.
  138. # See other terminal defines in term.h.
  139. # Define ULTRIX_KLUDGE if you have the every-other plot problem in Ultrix X11.
  140. #
  141. # -DAPOLLO      Apollo Graphics Primitive Resource (window resize after replot)
  142. # -DGPR         Apollo Graphics Primitive Resource (fixed-size window)
  143. # -DCGI         SCO CGI
  144. # -DIRIS4D      IRIS4D series computer
  145. # -DSUN         Sun Microsystems Workstation
  146. # -DUNIXPC      unixpc (ATT 3b1 or ATT 7300)
  147. # -DUNIXPLOT    unixplot
  148. # -DX11         X11 Window System (This is $(PLOTXFLAG))
  149. TERMFLAGS = -Iterm -DUNIXPLOT $(PLOTXFLAG) 
  150.  
  151. ############################################################
  152. # Library explanations. 
  153. #  You shouldn't need to adjust this; again, it is handled by the
  154. # machine-dependent definitions below.
  155. #
  156. #  -lplot if you have -DUNIXPLOT in TERMFLAGS
  157. #  -lsuntool -lsunwindow -lpixrect  if you have -DSUN in TERMFLAGS
  158. #  -lgl_s if -DIRIS4D in TERMFLAGS
  159. #  -lccgi if -DCGI in TERMFLAGS
  160. LIBS = -lm -lplot
  161.  
  162. ####################################################################
  163. # List of object files except version.o
  164. OBJS = bitmap.o command.o contour.o eval.o graphics.o graph3d.o help.o \
  165.        internal.o misc.o parse.o plot.o readline.o scanner.o \
  166.        setshow.o standard.o term.o util.o  
  167.  
  168. NEXTOBJS = EPSView.o EpsViewer.o
  169. ############################################################
  170. # Machine-dependent settings.
  171. #
  172. X11_FLAGS = \
  173.            CFLAGS="$(COPTS) $(OPTIONS)" \
  174.            LIBS="$(LIBS)" X11FLAGS="$(X11FLAGS)" X11INCLUDES="$(X11INCLUDES)" \
  175.            X11LIBS="$(X11LIBS)" \
  176.            PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
  177.            X11INSTALL="$(X11INSTALL)" \
  178.            TERMFLAGS="$(TERMFLAGS)"
  179.  
  180. DEC_FLAGS = \
  181.            CFLAGS="$(COPTS) $(OPTIONS) " \
  182.            LIBS="$(LIBS)" X11FLAGS="$(X11FLAGS)" X11INCLUDES="$(X11INCLUDES)" \
  183.            X11LIBS="$(X11LIBS)" \
  184.            PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
  185.            X11INSTALL="$(X11INSTALL)" \
  186.            TERMFLAGS="$(TERMFLAGS) -DULTRIX_KLUDGE"
  187.  
  188. APOLLO_FLAGS = \
  189.            CFLAGS="$(COPTS) $(OPTIONS)  -DGAMMA=lgamma" \
  190.            LIBS="$(LIBS)" X11FLAGS="$(X11FLAGS)" \
  191.            X11INCLUDES="$(X11INCLUDES)" \
  192.            X11LIBS="-L/usr/lib/X11 -lX11" \
  193.            PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
  194.            X11INSTALL="$(X11INSTALL)" \
  195.            TERMFLAGS="$(TERMFLAGS) -DAPOLLO -DGPR"
  196.  
  197. HP_FLAGS = \
  198.            CFLAGS="+O1 $(OPTIONS) -DMEMSET -DMEMCPY  -DGETCWD" \
  199.            LIBS="-lm" X11FLAGS="$(X11FLAGS)" \
  200.            X11INCLUDES="-I/usr/include/X11R4" \
  201.            X11LIBS="-L/usr/lib/X11R4 -lX11" \
  202.            PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
  203.            X11INSTALL="$(X11INSTALL)" \
  204.            TERMFLAGS="-Iterm -DX11"
  205.  
  206. SUN_FLAGS = \
  207.            CFLAGS="$(COPTS) $(OPTIONS)" \
  208.            LIBS="-lsuntool -lsunwindow -lpixrect $(LIBS)" \
  209.            X11FLAGS=" " X11INCLUDES=" " \
  210.            X11LIBS=" " \
  211.            PLOTXFLAG=" " GNUPLOT_X11=" " X11INSTALL=x11_noinstall \
  212.            TERMFLAGS="-Iterm -DUNIXPLOT -DSUN"
  213.  
  214. SUN_X11_FLAGS = \
  215.            CFLAGS="$(COPTS) $(OPTIONS)" \
  216.            LIBS="-lsuntool -lsunwindow -lpixrect $(LIBS)" \
  217.            X11FLAGS="$(X11FLAGS)" X11INCLUDES="$(X11INCLUDES)" \
  218.            X11LIBS="$(X11LIBS)" \
  219.            PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
  220.            X11INSTALL="$(X11INSTALL)" \
  221.            TERMFLAGS="$(TERMFLAGS) -DSUN"
  222.  
  223. SGI_FLAGS = \
  224.            CFLAGS="$(COPTS) $(OPTIONS) -DGETCWD -DNOVFORK" \
  225.            LIBS="-lgl_s -lm" X11FLAGS=" " X11INCLUDES=" " \
  226.            X11LIBS=" " \
  227.            PLOTXFLAG=" " GNUPLOT_X11=" " X11INSTALL=x11_noinstall \
  228.            TERMFLAGS="-Iterm -DIRIS4D"
  229.  
  230. SGIX11_FLAGS = \
  231.            CFLAGS="$(COPTS) $(OPTIONS) -DGETCWD -DNOVFORK" \
  232.            LIBS="-lgl_s -lm -lc_s" X11FLAGS="$(X11FLAGS)" \
  233.            X11INCLUDES="$(X11INCLUDES)" \
  234.            X11LIBS="-L/usr/lib/X11 -lX11" \
  235.             PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
  236.             X11INSTALL="$(X11INSTALL)" \
  237.            TERMFLAGS="-Iterm -DX11 -DIRIS4D"
  238.  
  239. CGI_FLAGS = \
  240.            CFLAGS="$(COPTS) $(OPTIONS) -Dunix" \
  241.            LIBS="-lccgi $(LIBS)" X11FLAGS=" " X11INCLUDES=" " \
  242.            X11LIBS=" " PLOTXFLAG=" " GNUPLOT_X11=" " X11INSTALL=x11_noinstall \
  243.            TERMFLAGS="-Iterm -DUNIXPLOT -DCGI"
  244.  
  245. 3B1_FLAGS = \
  246.            CFLAGS="$(COPTS) $(OPTIONS) -DGETCWD -DMEMSET -DMEMCPY -DNOVFORK" \
  247.            LIBS="$(LIBS)" X11FLAGS=" " X11INCLUDES=" " \
  248.            X11LIBS=" " \
  249.            PLOTXFLAG=" " GNUPLOT_X11=" " X11INSTALL=x11_noinstall \
  250.            LD="ld /lib/crt0s.o /lib/shlib.ifile" \
  251.            TERMFLAGS="-Iterm -DUNIXPC"
  252.  
  253. 386IX_FLAGS = \
  254.            CFLAGS="$(COPTS) $(OPTIONS) -DGETCWD -DMEMSET -DMEMCPY -DNOVFORK -DTCSETSW -DTCGETS" \
  255.            LIBS="$(LIBS) -lcposix" X11FLAGS=" " X11INCLUDES=" " \
  256.            X11LIBS=" " PLOTXFLAG=" " GNUPLOT_X11=" " \
  257.            X11INSTALL=x11_noinstall \
  258.            TERMFLAGS="-Iterm -DUNIXPLOT"
  259. 386IX_X11_FLAGS = \
  260.            CFLAGS="$(COPTS) $(OPTIONS) -DGETCWD -DMEMSET -DMEMCPY -DNOVFORK -DTCSETSW -DTCGETS" \
  261.            LIBS="$(LIBS) -lcposix" X11FLAGS="$(X11FLAGS)" X11INCLUDES="$(X11INCLUDES)" \
  262.            X11LIBS="$(X11LIBS)" PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11="$(GNUPLOT_X11)" \
  263.            X11INSTALL= "$(X11INSTALL)" \
  264.            TERMFLAGS="-Iterm -DUNIXPLOT -DX11"
  265.      
  266. AIX_FLAGS = \
  267.            CFLAGS="$(COPTS) $(OPTIONS) -Dunix -DNOVFORK" \
  268.            LIBS="$(LIBS)" X11FLAGS="$(X11FLAGS)" \
  269.            X11INCLUDES="$(X11INCLUDES)" \
  270.            X11LIBS="$(X11LIBS)" \
  271.            PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
  272.            X11INSTALL="$(X11INSTALL)" \
  273.            TERMFLAGS="$(TERMFLAGS)"
  274.  
  275. NEXT_FLAGS = \
  276.            CFLAGS="$(COPTS) -DGAMMA=lgamma -DNEXT" \
  277.            LIBS="-lNeXT_s -lsys_s -lm" \
  278.            X11FLAGS="$(X11FLAGS)" \
  279.            X11INCLUDES=" " X11LIBS=" " PLOTXFLAG=" " \
  280.            GNUPLOT_X11=" " X11INSTALL=x11_noinstall \
  281.            TERMFLAGS="-Iterm" OBJS=" $(OBJS) $(NEXTOBJS)"
  282.  
  283. NEXT_X11_FLAGS = \
  284.            CFLAGS="$(COPTS) -DGAMMA=lgamma -DNEXT" \
  285.            LIBS="-lNeXT_s -lsys_s -lm" \
  286.            X11LIBS="-L/usr/lib/X11 -lX11" \
  287.            X11INCLUDES="$(X11INCLUDES)" X11FLAGS="$(X11FLAGS)" \
  288.            PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
  289.            X11INSTALL="$(X11INSTALL)" \
  290.            TERMFLAGS="-Iterm -DX11" OBJS=" $(OBJS) $(NEXTOBJS)"
  291.  
  292. CRAY_FLAGS = \
  293.        CFLAGS="$(COPTS) $(OPTIONS) -DGETCWD -DNOVFORK" \
  294.        LIBS="-lm" X11FLAGS=" " \
  295.        X11INCLUDES=" " \
  296.        X11LIBS=" " \
  297.        PLOTXFLAG=" " GNUPLOT_X11=" " \
  298.        X11INSTALL=x11_noinstall \
  299.        TERMFLAGS="-Iterm"
  300.  
  301. CRAY_X11_FLAGS = \
  302.        CFLAGS="$(COPTS) $(OPTIONS) -DGETCWD -DNOVFORK" \
  303.        LIBS="-lm" X11FLAGS="$(X11FLAGS)" \
  304.        X11INCLUDES="$(X11INCLUDES)" \
  305.        X11LIBS="$(X11LIBS)" \
  306.        PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11="$(GNUPLOT_X11)" \
  307.        X11INSTALL=$(X11INSTALL) \
  308.        TERMFLAGS="-Iterm -DX11"
  309.  
  310. PTX_X11_FLAGS = \
  311.        CFLAGS="$(COPTS) $(OPTIONS) -DGETCWD -DMEMSET -DMEMCPY -DCRIPPLED_SELECT" \
  312.        LIBS="-lm -lplot" X11FLAGS="$(X11FLAGS)" \
  313.        X11INCLUDES="$(X11INCLUDES)" \
  314.        X11LIBS="-lX11 -lseq -lsocket -linet -lnsl" \
  315.        PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11="$(GNUPLOT_X11)" \
  316.        X11INSTALL=$(X11INSTALL) \
  317.        TERMFLAGS="$(TERMFLAGS)"
  318.  
  319. CONVEX_X11_FLAGS = \
  320.            CFLAGS="$(COPTS) $(OPTIONS) -DHUGE=8.9e307" \
  321.            LIBS="$(LIBS)" X11FLAGS="$(X11FLAGS)" X11INCLUDES="$(X11INCLUDES)" \
  322.            X11LIBS="$(X11LIBS)" \
  323.            PLOTXFLAG="$(PLOTXFLAG)" GNUPLOT_X11=$(GNUPLOT_X11) \
  324.            X11INSTALL="$(X11INSTALL)" \
  325.            TERMFLAGS="$(TERMFLAGS)"
  326.  
  327. ####################################################################
  328. # List of source files
  329. # Used for makeing shar files, lint, and some dependencies.
  330. DIRS = term demo docs docs/latextut
  331.  
  332. CSOURCE1 = command.c setshow.c 
  333. CSOURCE2 = help.c graphics.c graph3d.c internal.c 
  334. CSOURCE3 = misc.c eval.c parse.c plot.c readline.c scanner.c standard.c 
  335. CSOURCE4 = bitmap.c term.c util.c version.c
  336. CSOURCE5 = term/amiga.trm term/aed.trm term/cgi.trm term/dumb.trm term/dxf.trm \
  337.     term/dxy.trm term/eepic.trm term/epson.trm term/fig.trm \
  338.     term/hp26.trm term/hp2648.trm term/hpgl.trm term/hpljii.trm \
  339.     term/apollo.trm term/gpr.trm term/ai.trm term/next.trm
  340. CSOURCE6 = term/impcodes.h term/imagen.trm term/object.h \
  341.     term/iris4d.trm term/kyo.trm term/latex.trm term/pbm.trm term/pc.trm 
  342. CSOURCE7 = term/post.trm term/qms.trm term/regis.trm term/sun.trm \
  343.     term/t410x.trm term/tek.trm term/unixpc.trm term/unixplot.trm \
  344.     term/v384.trm term/x11.trm term/bigfig.trm term/vws.trm gnuplot_x11.c
  345. CSOURCE8 = contour.c
  346. NEXTSRC  = EPSView.m EPSView.h EpsViewer.m EpsViewer.h
  347. # not C code, but still needed
  348.  
  349. DEMOS = demo/1.dat demo/2.dat demo/3.dat demo/contours.demo demo/controls.demo \
  350.     demo/electron.demo demo/glass.dat demo/param.demo demo/polar.demo \
  351.     demo/simple.demo demo/surface1.demo demo/surface2.demo demo/using.dat \
  352.     demo/using.demo demo/world.cor demo/world.dat demo/world.demo \
  353.     demo/err.dat demo/poldat.demo demo/polar.dat demo/errorbar.demo \
  354.     demo/antenna.dat demo/all.demo demo/bivariat.demo demo/hidden.demo
  355.  
  356. ETC = Copyright README README.gnutex README.amiga makefile.unx makefile.vms  \
  357.     linkopt.amg makefile.amg makefile.ami linkopt.vms buildvms.com \
  358.     lasergnu  README.3d README.x11 README.NeXT \
  359.     term/README History gnuplot.el Intergraph.x11 README.Install
  360.  
  361. #BETA files (not standard distribution files)
  362. BETA = BETA6
  363. # PC-specific files
  364. PC = corgraph.asm corplot.c header.mac hrcgraph.asm lineproc.mac \
  365.     linkopt.msc linkopt.tc linkopt.tco makefile.msc makefile.tc \
  366.     pcgraph.asm 
  367.  
  368. # Documentation and help files
  369. DOCS1 = docs/Makefile docs/README docs/checkdoc.c docs/doc2gih.c \
  370.     docs/doc2hlp.c docs/doc2hlp.com docs/doc2ms.c docs/doc2tex.c \
  371.     docs/gnuplot.1 docs/lasergnu.1 docs/toc_entry.sty \
  372.     docs/titlepage.ms docs/titlepage.tex docs/Makefile.ami
  373. DOCS2 = docs/gnuplot.doc
  374. DOCS3 = docs/latextut/Makefile docs/latextut/eg1.plt \
  375.     docs/latextut/eg2.plt docs/latextut/eg3.dat docs/latextut/eg3.plt \
  376.     docs/latextut/eg4.plt docs/latextut/eg5.plt docs/latextut/eg6.plt \
  377.     docs/latextut/header.tex docs/latextut/tutorial.tex \
  378.     docs/latextut/linepoint.plt
  379.  
  380. #########################################################################
  381. # Default target (informational)
  382. info:
  383.     @echo "Please do a 'make <MACHINE>' where <MACHINE> is one of the following:"
  384.     @echo 
  385.     @echo "apollo       for Apollo running SR10.3 with Apollo's X11"
  386.     @echo "dec          for Dec3100/5000 running Ultrix 3.1d with MIT's X11"
  387.     @echo "hp           for HP/9000 700 series running HP/UX 8.0 with MIT's X11R4"
  388.     @echo "sun          for Sun sparcstation running SunOS 4.1 with suntools (no X11) "
  389.     @echo "sun_x11      for Sun sparcstation running SunOS 4.1 with suntools and X11 "
  390.     @echo "sgi          for Silicon Graphics IRIS4D machines (no X11) "
  391.     @echo "sgix11       for Silicon Graphics IRIS4D machines (X11) "
  392.     @echo "next         for NeXT Cube and Slab running NeXTOS 2.0+ (no X11)"
  393.     @echo "next_11      for NeXT Cube and Slab running NeXTOS 2.0+ with X11"
  394.     @echo "3b1          for ATT 3b1 machines (no X11) "
  395.     @echo "386ix        for 386 machines running 386/ix (no X11)"
  396.     @echo "386ix_x11    for 386 machines running 386/ix with T.Roell X386"
  397.     @echo "ibmrs6000    for IBM RS/6000 running Aix 3.1 with IBM's X11"
  398.     @echo "x11          for a generic machine (like a sun or dec) with MIT's X11"
  399.     @echo "cray         for Cray Y-MP or Cray-2 running Unicos 6.0 or 6.1 (no X11)"
  400.     @echo "cray_x11     for Cray Y-MP or Cray-2 running Unicos 6.0 or 6.1 with X11"
  401.     @echo "ptx_x11      for Sequent Dynix/PTX with MIT X11"
  402.     @echo "convex_x11   for Convex 9.0 with MIT X11"
  403.     @echo 
  404.     @echo "Examples:"
  405.     @echo
  406.     @echo "         make x11"
  407.     @echo "         make apollo"
  408.     @echo "         make apollo       OPTIONS='-DNOCWDRC' "
  409.     @echo "         make apollo       DEST='/usr/um/misc/bin' "
  410.     @echo "         make dec"
  411.     @echo "         make hp"
  412.     @echo "         make next"
  413.     @echo "         make sun          HELPDEST='/usr/um/misc/lib/gnuplot.gih' "
  414.     @echo "         make sun          X11INCLUDES='-I/usr/local/include' "
  415.     @echo "         make sun_x11"
  416.     @echo "         make sgi"
  417.     @echo "         make 3b1"
  418.     @echo "         make 386ix"
  419.     @echo "         make ibmrs6000    MANDEST='/usr/um/misc/man/man1' COPTS='-O' "
  420.     @echo "         make cray"
  421.     @echo "         make cray_x11"
  422.     @echo 
  423.     @echo "If you just type 'make All' , it will build gnuplot for Unix X11"
  424.     @echo "and the following variables will be used as default:"
  425.     @echo 
  426.     @echo " DEST                     " $(DEST)
  427.     @echo " MANDEST                  " $(MANDEST)
  428.     @echo " HELPDEST                 " $(HELPDEST)
  429.     @echo " EMAIL                    " $(EMAIL)
  430.     @echo " CC                       " $(CC)
  431.     @echo " COPTS                    " $(COPTS)
  432.     @echo " OPTIONS                  " $(OPTIONS)
  433.     @echo " CFLAGS                   " $(CFLAGS)
  434.     @echo " LIBS                     " $(LIBS)
  435.     @echo " X11FLAGS                 " $(X11FLAGS)
  436.     @echo " X11LIBS                  " $(X11LIBS)
  437.     @echo " X11INCLUDES              " $(X11INCLUDES)
  438.     @echo " TERMFLAGS                " $(TERMFLAGS)
  439.     @echo " LASERGNU                 " $(LASERGNU)
  440.     @echo 
  441.     @echo "If you are not familiar with makefiles or just want to know what"
  442.     @echo " 'make <MACHINE>' would  do without actually doing anything, then type"
  443.     @echo " 'make <MACHINE> -n' "
  444.     @echo 
  445.  
  446. ###############################################################
  447. # Targets for each machine
  448.  
  449. x11:
  450.     $(MAKE) $(MFLAGS) $(MY_FLAGS) $(X11_FLAGS)    $(TARGET)
  451.  
  452. dec:
  453.     $(MAKE) $(MFLAGS) $(MY_FLAGS) $(DEC_FLAGS)      $(TARGET)
  454.  
  455. apollo:
  456.     $(MAKE) $(MFLAGS) $(MY_FLAGS) $(APOLLO_FLAGS)   $(TARGET)
  457.  
  458. hp:
  459.     $(MAKE) $(MFLAGS) $(MY_FLAGS) $(HP_FLAGS)       $(TARGET)
  460.  
  461. next:
  462.     $(MAKE) $(MFLAGS) $(MY_FLAGS) $(NEXT_FLAGS)     $(TARGET)
  463.  
  464. next_x11:
  465.     $(MAKE) $(MFLAGS) $(MY_FLAGS) $(NEXT_X11_FLAGS)     $(TARGET)
  466.  
  467. sun:
  468.     $(MAKE) $(MFLAGS) $(MY_FLAGS) $(SUN_FLAGS)      $(TARGET)
  469.  
  470. sun_x11:
  471.     $(MAKE) $(MFLAGS) $(MY_FLAGS) $(SUN_X11_FLAGS)  $(TARGET)
  472.  
  473. sgi:
  474.     $(MAKE) $(MFLAGS) $(MY_FLAGS) $(SGI_FLAGS)      $(TARGET)
  475.  
  476. sgix11:
  477.     $(MAKE) $(MFLAGS) $(MY_FLAGS) $(SGIX11_FLAGS)   $(TARGET)
  478.  
  479. cgi:
  480.     $(MAKE) $(MFLAGS) $(MY_FLAGS) $(CGI_FLAGS)      $(TARGET)
  481.  
  482. 3b1:
  483.     $(MAKE) $(MFLAGS) $(MY_FLAGS) $(3B1_FLAGS)      $(TARGET)
  484.  
  485. 386ix:
  486.     $(MAKE) $(MFLAGS) $(MY_FLAGS) $(386IX_FLAGS)    $(TARGET)
  487.  
  488. 386ix_x11: 
  489.     $(MAKE) $(MFLAGS) $(MY_FLAGS) $(386IX_X11_FLAGS) $(TARGET)
  490.  
  491. ibmrs6000:
  492.     $(MAKE) $(MFLAGS) $(MY_FLAGS) $(AIX_FLAGS)      $(TARGET)
  493.  
  494. cray:
  495.     $(MAKE) $(MFLAGS) $(MY_FLAGS) $(CRAY_FLAGS)     $(TARGET)
  496. cray_x11:
  497.     $(MAKE) $(MFLAGS) $(MY_FLAGS) $(CRAY_X11_FLAGS) $(TARGET)
  498. ptx_x11:
  499.     $(MAKE) $(MFLAGS) $(MY_FLAGS) $(PTX_X11_FLAGS) $(TARGET)
  500. convex_x11:
  501.     $(MAKE) $(MFLAGS) $(MY_FLAGS) $(CONVEX_X11_FLAGS) $(TARGET)
  502.  
  503. #############################################################
  504. # Targets that really do something
  505.  
  506. all:
  507.     @echo "Please just type  'make'  in order to get some information on "
  508.     @echo "how to build gnuplot under Unix and the X Window System."
  509.  
  510. All:    gnuplot $(GNUPLOT_X11) doc
  511.  
  512. gnuplot: $(OBJS) version.o
  513.     $(LD) $(OBJS) version.o $(LIBS) -o gnuplot
  514.  
  515. doc:
  516.     ( cd docs; $(MAKE) $(MFLAGS) gnuplot.gih )
  517.  
  518. gnuplot_x11: gnuplot_x11.c
  519.     $(CC) $(CFLAGS) $(X11FLAGS) $(X11INCLUDES) -o gnuplot_x11 gnuplot_x11.c $(X11LIBS)
  520.  
  521. ################################################################
  522. # Installation instructions
  523.  
  524. install:
  525.     @echo 
  526.     @echo "Please do a 'make <MACHINE> TARGET=Install' where <MACHINE> is one of the following:"
  527.     @echo 
  528.     @echo "apollo, dec, hp, sun, sun_x11, sgi, sgix11, cgi,"
  529.     @echo "next, next_x11, 3b1, 386ix, 386ix_x11, ibmrs6000,"
  530.     @echo "x11, cray, cray_x11, ptx_x11, convex_x11"
  531.     @echo 
  532.     @echo "Examples:"
  533.     @echo
  534.     @echo "         make x11          TARGET=Install "
  535.     @echo "         make apollo       TARGET=Install "
  536.     @echo "         make dec          TARGET=Install "
  537.     @echo "         make hp           TARGET=Install "
  538.     @echo "         make sun          TARGET=Install HELPDEST='/usr/um/misc/lib/gnuplot.gih' "
  539.     @echo "         make ibmrs6000    TARGET=Install MANDEST='/usr/um/misc/man/man1' COPTS='-O' "
  540.     @echo 
  541. ################################################################
  542. # Installation targets
  543.  
  544. Install: All man_install $(X11INSTALL) $(LASERGNU)
  545.     cp gnuplot     $(DEST)
  546.     strip $(DEST)/gnuplot
  547.     ( cd docs; $(MAKE) $(MFLAGS) install-unix HELPDEST=$(HELPDEST) )
  548.  
  549. x11_install: gnuplot_x11
  550.     cp gnuplot_x11 $(DEST)
  551.     strip $(DEST)/gnuplot_x11
  552.  
  553. x11_noinstall: 
  554.     @echo "X11 not requested, so gnuplot_x11 program not installed"
  555.  
  556. man_install: docs/gnuplot.1
  557.     cp docs/gnuplot.1 $(MANDEST)
  558.  
  559. lasergnu_install: lasergnu docs/lasergnu.1
  560.     cp lasergnu $(DEST)
  561.     chmod 755 $(DEST)/lasergnu
  562.     cp docs/lasergnu.1 $(MANDEST)
  563.  
  564. lasergnu_noinstall:
  565.     @echo 
  566.     @echo "Lasergnu will not be installed by default."
  567.     @echo "If you think you need the lasergnu script to print"
  568.     @echo " files on the imagen or postscript printers, then"
  569.     @echo " type"
  570.     @echo "      'make <MACHINE> TARGET=Install LASERGNU='lasergnu_install' "
  571.     @echo
  572.     @echo "Lasergnu is really not needed since within gnuplot you can"
  573.     @echo " can create files (in impress or postscript language) and"
  574.     @echo " print them through your favorite print command (lpr, lp, prf, ipr)."
  575.     @echo 
  576.  
  577. ################################################################
  578. # Dependencies
  579.  
  580. plot.o: plot.c
  581.     $(CC) $(CFLAGS) $(PLOTXFLAG) -c plot.c
  582.  
  583. term.o: term.h term.c $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
  584.     $(CC) $(CFLAGS) $(TERMFLAGS) -c term.c
  585.  
  586. version.o:
  587.     $(CC) $(CFLAGS) -DCONTACT=\"$(EMAIL)\" -c version.c
  588.  
  589. EpsViewer.o : EpsViewer.h EpsViewer.m EPSView.h
  590.     $(CC) -c EpsViewer.m
  591.  
  592. EPSView.o : EPSView.h EPSView.m
  593.         $(CC) -c EPSView.m  
  594.  
  595. $(OBJS): plot.h
  596.  
  597. command.o: command.c
  598.     $(CC) $(CFLAGS) -c command.c -DHELPFILE=\"$(HELPDEST)\"
  599.  
  600. command.o help.o misc.o: help.h
  601.  
  602. command.o graphics.o graph3d.o misc.o plot.o setshow.o term.o: setshow.h
  603.  
  604. bitmap.o term.o: bitmap.h
  605.  
  606. ################################################################
  607. # Miscellaneous targets
  608.  
  609. SOURCES=plot.h help.h setshow.h bitmap.h term.h $(CSOURCE1) $(CSOURCE2) \
  610.     $(CSOURCE3) $(CSOURCE4) $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)\
  611.      $(CSOURCE8) $(NEXTSRC)
  612.  
  613. DOCS  = $(DOCS1) $(DOCS2) $(DOCS3)
  614.  
  615. lint:
  616.     lint -hx $(SOURCES)
  617.  
  618. clean:
  619.     rm -f *.o *~ *.bak term/*~ term/*.bak
  620.     ( cd docs; $(MAKE) $(MFLAGS) clean )
  621.     ( cd docs/latextut; $(MAKE) $(MFLAGS) clean )
  622.  
  623. spotless:
  624.     rm -f *.o *~ *.bak term/*~ term/*.bak TAGS gnuplot gnuplot_x11
  625.     ( cd docs; $(MAKE) $(MFLAGS) clean )
  626.     ( cd docs/latextut; $(MAKE) $(MFLAGS) spotless )
  627.  
  628. ################################################################
  629. # Making shar files for mailing gnuplot
  630.  
  631. shar: gnuplot.sh00 gnuplot.sh01 gnuplot.sh02 gnuplot.sh03 gnuplot.sh04 \
  632.     gnuplot.sh05 gnuplot.sh06 gnuplot.sh07 gnuplot.sh08 \
  633.     gnuplot.sh09 gnuplot.sh10 gnuplot.sh11 gnuplot.sh12 \
  634.     gnuplot.sh13 gnuplot.sh14 gnuplot.sh15 
  635.  
  636. gnuplot.sh00:
  637.     echo '#!/bin/sh' > gnuplot.sh00
  638.     echo '# This is a shell file to make directories' >> gnuplot.sh00
  639.     echo mkdir $(DIRS) >> gnuplot.sh00
  640.  
  641. gnuplot.sh01: $(ETC)
  642.     shar $(ETC) > gnuplot.sh01
  643.  
  644. gnuplot.sh02: $(DOCS1)
  645.     shar $(DOCS1) > gnuplot.sh02
  646.  
  647. gnuplot.sh03: $(DOCS2)
  648.     shar $(DOCS2) > gnuplot.sh03
  649.  
  650. gnuplot.sh04: $(DOCS3)
  651.     shar $(DOCS3) > gnuplot.sh04
  652.  
  653. gnuplot.sh05: $(CSOURCE1)
  654.     shar $(CSOURCE1) > gnuplot.sh05
  655.  
  656. gnuplot.sh06: $(CSOURCE2)
  657.     shar $(CSOURCE2) > gnuplot.sh06
  658.  
  659. gnuplot.sh07: $(CSOURCE3)
  660.     shar $(CSOURCE3) > gnuplot.sh07
  661.  
  662. gnuplot.sh08: $(CSOURCE4)
  663.     shar $(CSOURCE4) > gnuplot.sh08
  664.  
  665. gnuplot.sh09: $(CSOURCE5)
  666.     shar $(CSOURCE5) > gnuplot.sh09
  667.  
  668. gnuplot.sh10: $(CSOURCE6)
  669.     shar $(CSOURCE6) > gnuplot.sh10
  670.  
  671. gnuplot.sh11: $(CSOURCE7)
  672.     shar $(CSOURCE7) > gnuplot.sh11
  673.  
  674. gnuplot.sh12: $(PC)
  675.     shar $(PC) > gnuplot.sh12
  676.  
  677. gnuplot.sh13: $(CSOURCE8)
  678.     shar $(CSOURCE8) > gnuplot.sh13
  679.  
  680. gnuplot.sh14: $(DEMOS)
  681.     shar $(DEMOS) > gnuplot.sh14
  682.  
  683. gnuplot.sh15: $(BETA)
  684.     shar $(BETA) > gnuplot.sh15
  685.  
  686. tar: $(ETC) $(SOURCES) $(PC) $(DEMOS) $(BETA) $(DOCS)
  687.     $(TAR) cvf /tmp/gnuplot.tar $(ETC) $(SOURCES) $(PC)\
  688.          $(DEMOS) $(BETA) $(DOCS)
  689. rcsdoc:
  690.     rcs -o-$(RCSOLD) -l$(RCSVER) $(DOCS)
  691.  
  692. rcs:
  693.     rcs -l$(RCSVER) -c$(RCSCOM) $(ETC) $(SOURCES) $(PC)
  694.  
  695. ci:
  696.     ci -l$(RCSVER) -m$(RCSCOM) $(SOURCES) $(PC) $(ETC)
  697.  
  698. cidoc:
  699.     ci -l$(RCSVER) -m$(RCSCOM) $(DOCS)
  700.  
  701. cidemo:
  702.     ci -l$(RCSVER) -m$(RCSCOM) $(DEMOS)
  703.  
  704. co:
  705.     co -l -r$(RCSVER) $(ETC) $(SOURCES) $(PC)
  706.  
  707. codoc:
  708.     co -l -r$(RCSVER) $(DOCS)
  709.  
  710. codemo:
  711.     co -l -r$(RCSVER) $(DEMOS)
  712.  
  713.